import type { App } from 'vue'
import { UseModuleType } from '@apps/_share/enums'
import Arco from '@arco-design/web-vue'
import { BaseIcon } from '@pkgs/components'
import '@arco-design/web-vue/dist/arco.css'
import '@apps/_share/style/reset.css'
import 'virtual:uno.css'

const BaseComponents = [
  BaseIcon,
]

function registerComponent(app: App) {
  app.use(Arco)

  BaseComponents.forEach((component) => {
    app.component(component.name!, component)
  })
}

export function install(app: App) {
  registerComponent(app)
}

export const moduleType = UseModuleType.UI
